#include "ljdef.h"

#include <stdio.h>
#include <string.h>

int buffer_to_string(char* dest, int width, const struct data_buf* buf)
{
    return snprintf(dest, width, "ptr=%p, fd=%d, buff=%.*s", buf, buf->fd, width, buf->buff);
}